#ifndef numuCCAnalysis_h
#define numuCCAnalysis_h

#include "baseAnalysis.hxx"
#include "AnaBoxB.hxx"
#include "AnalysisUtils.hxx"

class numuCCAnalysis: public baseAnalysis {
 public:
  numuCCAnalysis(AnalysisAlgorithm* ana=NULL);
  virtual ~numuCCAnalysis(){}

  //---- These are mandatory functions
  void DefineSelections();
  void DefineCorrections();
  void DefineSystematics();
  void DefineMicroTrees(bool addBase=true);
  void DefineTruthTree();

  bool Process();

  void FillMicroTrees(bool addBase=true);
  void FillToyVarsInMicroTrees(bool addBase=true);

  bool CheckFillTruthTree(const AnaTrueVertex& vtx);
  bool CheckFillRooTracker(const AnaTrueVertex& vtx);

  void FillTruthTree(const AnaTrueVertex& vtx);
  //--------------------

  void FillCategories();

private:
  Int_t _whichFGD; // 1 for FGD1 analysis, 2 for FGD2, 3 for both

public:

  enum enumStandardMicroTrees_numuCCAnalysis{
    selmu_truemom = enumStandardMicroTreesLast_baseAnalysis+1,
    truemu_truemom,
    truemu_truecostheta,
    selmu_costheta,
    selmu_closest_tpc,
    selmu_detectors,
    selmu_truepos,
    selmu_trueendpos,
    selmu_truedir,
    selmu_dir,
    selmu_pos,
    selmu_endpos,
    selmu_ntpcs,
    selmu_tpc_det,
    selmu_tpc_nhits,
    selmu_tpc_nnodes,
    selmu_tpc_charge,
    selmu_tpc_mom,
    selmu_tpc_bfield_mom,
    selmu_tpc_efield_mom,
    selmu_tpc_emom,
    selmu_tpc_truemom,
    selmu_tpc_dedx_raw,
    selmu_tpc_dedx_expmu,
    selmu_tpc_dedx_exppi,    
    selmu_tpc_dedx_expele,
    selmu_tpc_dedx_expp,
    selmu_nfgds,
    selmu_fgd_det,
    selmu_fgd_x,
    selmu_fgd_V00,
    selmu_fgd_V11,
    selmu_fgd_V33,
    selmu_fgd_V55,
    selmu_fgd_V77,
    selmu_fgd_pullmu,

    selmu_necals,
    selmu_ecal_det,
    
    selmu_ecal_nhits,
    selmu_ecal_nnodes,
    selmu_ecal_length,
    selmu_ecal_showerstartpos,
    selmu_ecal_showerendpos,
    selmu_ecal_showerstartdir,
    selmu_ecal_showerenddir,
    
    selmu_ecal_EMenergy,
    selmu_ecal_edeposit,
    selmu_ecal_IsShower,
    
    selmu_ecal_mipem,
    selmu_ecal_mippion,
    selmu_ecal_emhip,
    selmu_ecal_containment,
    selmu_ecal_trshval,
    selmu_ecal_mostupstreamlayerhit,

    selmu_mom,
    shmn_mom,
    selmu_amom,
    selmu_theta,
    selmu_likemip,
    selmu_likemu,
    selmu_tpc_pullmu,
    selmu_tpc_pullpi,
    selmu_tpc_pullele,
    selmu_tpc_pullp,
    selmu_tpc_dedx,

    truemu_truepos,
    truemu_truedir,

    fgd2reaction,
    fgd2topology,
    fgd2mectopology,

    enumStandardMicroTreesLast_numuCCAnalysis
  };

};

#endif
